package blog.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * 用户信息
 */
@Data
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String username;

    private String password;

    private String phone;

    /**
     * 0为男，1为女
     */
    private Integer sex;

    private String email;

    private String salt;

    private String image;

    @TableField(fill = FieldFill.INSERT, value = "create_time")
    private LocalDateTime createTime;


    public User(String username, String password, String s) {
        this.username = username;
        this.password = password;
        this.salt = s;
    }
    //无参构造
    public User() {
    }
}
